home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / gradientslider_gc.doc < prev    next >
Text File  |  1993-10-15  |  3KB  |  70 lines

  1. TABLE OF CONTENTS
  2.  
  3. gradientslider.gadget/gradientslider.gadget
  4. gradientslider.gadget/gradientslider.gadgetlider.gadget/gradientslider.gadget
  5.  
  6.    NAME
  7.     gradientslider.gadget -- create a slider with a range of colors as its
  8.                  background. (V39)
  9.  
  10.    FUNCTION
  11.     The gradientslider gadget class is a type of non-proportional slider.
  12.     The primary feature of the gradient slider is it's appearance. Unlike
  13.     normal sliders, a gradient slider can display a "spread of colors" or
  14.     "color gradient" in the slider container box. The "knob" or "thumb"
  15.     of the slider appears to slide on top of this color gradient.
  16.  
  17.     The color gradient effect is built-up using a combination of multiple
  18.     pens and half-tone dithering. The application must tell the slider
  19.     exactly which pens to use in creating the gradient effect, and in
  20.     what order to use them. Essentially, it does this by passing an
  21.     array of pens (terminated by ~0, just like a PenSpec) to the slider.
  22.     The first pen in the array is used as the color at the top of
  23.     the slider (or left, if it is horizontal), and the last color in the
  24.     array is used at the bottom (or right). The other pens will be
  25.     used at evenly spaced intervals in between. Dithering is used to
  26.     smoothly fade between the pens, allowing the illusion of a continuous
  27.     change in color.
  28.  
  29.    TAGS
  30.     GRAD_MaxVal (ULONG) - Set the maximum value that the slider can
  31.         represent, in the range 0..$FFFF. Default for this tag is
  32.         $FFFF. Applicability is (ISGU). (V39)
  33.  
  34.     GRAD_CurVal (ULONG) - Set or get the current value of the slider, in
  35.         the range 0..$FFFF. Default for this tag is 0. Applicability is
  36.         (ISGNU). (V39)
  37.  
  38.     GRAD_SkipVal (ULONG) - Set the amount by which the slider should
  39.         advance whenever the user clicks on either side of the knob.
  40.         Default for this tag is $1111. Applicability is (ISGU).
  41.         (V39)
  42.  
  43.     GRAD_KnobPixels (UWORD) - Set the size of the knob in pixels.
  44.         Default for this tag is 5. Applicability is (I).
  45.         (V39)
  46.  
  47.     GRAD_PenArray (UWORD *) - Specifies an array of pens that the slider
  48.         should use to create its gradient background. The array can
  49.         contain any number of pens, and is terminated with a pen
  50.         value of ~0. These pens can be allocated as shared, since
  51.         their RGB value is not altered by the slider. The first pen
  52.         is used on the top or left of the slider, and the last pen is
  53.         used on the bottom or right. All other pens are evenly spaced
  54.         out and used in between. Dithering is used between the pens
  55.         to enhance the smoothness of the gradient transition.
  56.  
  57.         A NULL pen array causes the background of the slider to be
  58.         rendered in the screen's background color. A pen array
  59.         containing only a single pen causes the background to be
  60.         rendered using that pen.
  61.  
  62.         Default for this tag is NULL. Applicability is (ISU).
  63.         (V39)
  64.  
  65.     PGA_FREEDOM (ULONG) - Determines the orientation of the slider. This
  66.         can be LORIENT_HORIZ for a horizontal slider, or LORIENT_VERT
  67.         for a vertical one. Default for this tag is LORIENT_HORIZ.
  68.         Applicability is (I). (V39)
  69.  
  70.